package com.eastmoney.emis.edda.infrastructure.eddi.po;

import com.eastmoney.emis.edda.domain.entity.EddiInstruction;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @description: Description
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.infrastructure.eddi.po
 * @author: 汪程程
 * @date: 2022/10/11 9:21 AM
 * @version: 1.0
 */
public class EmhkBankTrademidPo {
    public String EID;
    public LocalDateTime EITIME;
    public LocalDateTime EUTIME;
    public String PROCESSUSERID;
    public String PROCESSUSERNAME;
    public LocalDateTime PROCESSUSERTIME;

    public String HKCUACCID;
    // ddi 申请流水
    public String APPLYSERIALNO;
    // dda 授权id
    public String MANDATEID;
    // 资金状态：0待处理 1银行处理中 2银行处理成功 3银行处理失败 4资金存成功 5资金存失败 6作废
    public String STATUS;
    public String MONEYTYPE;
    public BigDecimal OCCURBALANCE;
    public String ARRIVALTIME;
    // ddi返回流水号
    public String TRANSACTIONID;
    // 流水号,格式YYYYMMDDxxxxxxxxxx,前八位为日期,拼接资金存取返回流水号（每日清算，柜台流水序号重置）
    public String SERIALNO;
    public String NOTE;

    public String BANKCODE;
    public String BANKACCOUNT;

    public EmhkBankTrademidPo() {
    }

    public EmhkBankTrademidPo(EddiInstruction eddiInstruction) {
        this.EID = eddiInstruction.getEid();
        this.HKCUACCID = eddiInstruction.getClientId();
        this.APPLYSERIALNO = eddiInstruction.getApplySerialNo();
        this.MANDATEID = eddiInstruction.getMandateId();
        this.STATUS = eddiInstruction.getStatus();
        this.MONEYTYPE = eddiInstruction.getMoneyType();
        this.OCCURBALANCE = eddiInstruction.getOccurBalance();
        this.ARRIVALTIME = eddiInstruction.getArrivalTime();
        this.TRANSACTIONID = eddiInstruction.getTransactionId();
        this.SERIALNO = eddiInstruction.getSerialNo();
        this.NOTE = eddiInstruction.getNote();
        this.BANKCODE = eddiInstruction.getBankCode();
        this.BANKACCOUNT = eddiInstruction.getBankAccount();
        this.PROCESSUSERNAME = eddiInstruction.getProcessUserName();
        this.PROCESSUSERTIME = eddiInstruction.getProcessTime();
    }
}
